import qs from 'Qs'
export  function getConfig(type:string,body:any,params:object){
  let conf = {};
  let headers;
  switch(type){
    case 'get':
        conf = {
            params: params,
            method:type,
            headers:{
                'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
            }
        }
    break;
    case 'post':
        conf = {
            data:body,
            method:type,
            headers:{
                'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
            }
        }
    break;
  }
  return conf
}